{extend name="default/template/base_index" /}


{block name="area_header"}
<link rel="stylesheet" type="text/css" media="all" href="__CDN__/jquery-datetimepicker/jquery.datetimepicker.css">
<script type="text/javascript" src="__CDN__/jquery-datetimepicker/jquery.datetimepicker.js"></script>
<link type="text/css" rel="stylesheet" href="__CDN__/select2/4.0.0/css/cosmo-skin.css" />
<style type="text/css">
    .vertical-align-middle>td{
        vertical-align: middle!important;
    }

.form-group{ margin-bottom: 5px !important; }
</style>
{/block}

{block name="area_body"}
{include file="default/Widget/topbar" /}
<div class="admin-main container-fluid">
    {include file="default/Widget/left" /}
    <div class="admin-main-content">
        {include file="default/Widget/breadcrumb" /}
        <div class="h4"><b>用户钱包记录</b>
            <a class="btn btn-default btn-sm" href="javascript:itboye.top_back();" target="_self"><i class="fa fa-reply"></i>返回</a>
        </div>
        <div class="filter-controls">
            <form class="form-inline searchForm" method="post" action="{:url('FinancialStatistics/walletHis')}">
                <div class="form-group col-lg-12 col-md-12">
                    <div class="input-group">
                        <div class="input-group-addon input-sm">时间<i class="fa fa-calendar"></i></div>
                        <input type="hidden" name="id" value="{$uid}">
                        <input type="text" name="startdatetime" id="startdatetime" class="form-control input-short input-sm" value="{:date('Y-m-d H:i:s',$startdatetime)}" />
                        <div class="input-group-addon input-sm">
                            <i class="fa fa-long-arrow-right"></i>
                        </div>
                        <input type="text" name="enddatetime" id="enddatetime" class="form-control input-short input-sm" value="{:date('Y-m-d H:i:s',$enddatetime)}" />
                    </div>
                    <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-search"></i>{:L('BTN_SEARCH')}</button>
                </div>
            </form>
        </div>
        <div class="btn-controls clearfix">
        </div>
        <div class="panel panel-default">
            <table class="table table-striped table-hover table-condensed">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>时间</th>
                    <th>变化前资金</th>
                    <th>变化后资金</th>
                    <th>变动数量</th>
                    <th>变动原因</th>
                    <th>变动来源</th>
                </tr>
                </thead>
                <tbody>
                {empty name="list"}
                <tr>
                    <td colspan="10" class="text-center">{:L('NO_DATA')}</td>
                </tr>
                {else/}
                {volist name="list" id="vo" key='k'}
                <tr class="vertical-align-middle">
                    <td>{$k}</td>
                    <td>{$vo.create_time|date="Y-m-d H:i:s",###}</td>
                    <td>{$vo.before_money / 100}元</td>
                    <td>{$vo.after_money / 100}元</td>
                    <td>
                        {gt name="vo.plus" value="0"}
                        +{$vo.plus / 100}元
                        {else/}
                        -{$vo.minus / 100}元
                        {/gt}
                    </td>
                    <td>{$vo.reason}</td>
                    <td>{$vo.from}</td>
                </tr>
                {/volist}
                {/empty}
                </tbody>
            </table>
            <div>{$show}</div>
        </div>
    </div>
    <!-- END admin-main-content -->
    <!-- Modal -->
</div>
<!-- END admin-main-->
{/block}

{block name="area_footer"}
<script src="__CDN__/select2/4.0.0/js/select2.min.js"></script>
<script src="__CDN__/select2/4.0.0/js/i18n/zh-CN.js"></script>
<script>
    $(function() {
        $('#startdatetime').datetimepicker({
            lang: 'ch',
            format:'Y-m-d H:i:s',
            // format:'Y-m-d',
            // timepicker:false,
        });
        $('#enddatetime').datetimepicker({
            lang: 'ch',
            format:'Y-m-d H:i:s',
        });
    });
</script>

{/block}